<h3><?php __e('Listing votes for "%s"', $node->getLabel());?></h3>
<?php if ($vote_objects->size() > 0):?>
<div class="nodesSort">
<?php _e('Sort by ');select_to_remote('sortby', $vote_sortby, 'xigg-admin-node-vote-list', array('created,DESC' => _('Newest first'), 'created,ASC' => _('Oldest first')), array('base' => '/node/' . $node_id . '/vote', 'params' => array()), _('Go'), 'xigg-admin-node-vote-list-select');?>
</div>
<?php form_tag('post', Sabai_URL::get('/node/' . $node_id . '/vote/submit'), array('id' => 'xigg-admin-node-vote-list-form'));?>
  <table>
    <thead>
      <tr>
        <th class="left"><input id="xigg-admin-node-vote-list-form-checkall" type="checkbox" onclick="$$('#xigg-admin-node-vote-list-form input.check').each(function(ele){ele.checked=$('xigg-admin-node-vote-list-form-checkall').checked});" /></th>
        <th class="left"><?php _e('Voter');?></th>
        <th><?php _e('Score');?></th>
        <th><?php _e('IP');?></th>
        <th><?php _e('Voted');?></th>
        <th class="left"><?php _e('Article');?></th>
        <th scope="col"><?php _e('Action');?></th>
      </tr>
    </thead>
    <tfoot>
      <tr>
        <td colspan="4" class="left">
          <input type="submit" name="delete" value="<?php _e('Delete');?>" />
        </td>
        <td colspan="3" class="right"><?php echo $this->helper('PageNavRemote', 'xigg-admin-node-vote-list', $vote_pages, $vote_page_requested, array('base' => '/node/' . $node_id . '/vote/list', 'params' => array('sortby' => $vote_sortby)));?></td>
      </tr>
    </tfoot>
    <tbody>
<?php   while ($e =& $vote_objects->getNext()):?>
      <tr>
        <td class="left"><input type="checkbox" class="check" name="votes[]" value="<?php echo $e->getId();?>" /></td>
        <td class="left"><?php $vote_user =& $e->get('User'); $vote_user->printHTMLLink();?></td>
        <td><?php _h($e->get('score'));?></td>
        <td><?php _h($e->get('ip'));?></td>
        <td><?php _h($this->helper('XiggAgo', $e->getTimeCreated()));?></td>
        <td class="left"><?php _h($node->getLabel());?></td>
        <td><?php link_to_remote(_('Edit'), 'xigg-admin-node-vote-list-update', array('base' => '/node/' . $node_id . '/vote/' . $e->getId() . '/edit'));?></td>
      </tr>
<?php   endwhile; ?>
    </tbody>
  </table>
<input type="hidden" name="_TOKEN" value="<?php echo $this->helper('Token', 'Admin_node_vote_submit');?>" />
<?php form_tag_end();?>
<div id="xigg-admin-node-vote-list-update"></div>
<?php else:?>
<?php _e('No votes found for this entry');?>
<?php endif;?>